<template>
	<view class="wrap">



		<view class="contain">
			


				<view class="my_from">
					<view class="text_name">
						<text>入驻申请</text>
					</view>
					<myForm :model="form" :rules="rules">
						
						<u-form-item label="姓名" prop="name">
							<u-input v-model="form.name" />
						</u-form-item>
						
						<formInput required prop="name" label="你的名字" v-model="form.name"></formInput>
						
						
						
						<formInput required prop="wx" label="微信号" v-model="form.name"></formInput>
						<formInput required prop="name" label="你的名字" v-model="form.name"></formInput>
						<formInput required prop="name" label="你的名字" v-model="form.name"></formInput>
						<view class="">
							<view class="text_rz">
								<text>入驻信息</text>
							</view>
							<u-input v-model="value" :type="type" :border="border" @click="show = true" />
							<u-action-sheet :list="actionSheetList" v-model="show" @click="actionSheetCallback">
							</u-action-sheet>
						</view>

						<formInput required prop="name" label="公司名称" v-model="form.name"></formInput>

						<formInput required prop="name" label="法人电话" v-model="form.name"></formInput>
						<view>
							<u-upload ref="uUpload" :action="action" :auto-upload="true"></u-upload>
							<u-button @click="submit">提交</u-button>
						</view>
						<formInput required prop="name" label="营业执照" v-model="form.name"></formInput>
						<formInput required prop="name" label="餐饮许可证" v-model="form.name"></formInput>
						<formInput required prop="name" label="其他补充材料" v-model="form.name"></formInput>
						<formInput required prop="name" label="店铺地址" v-model="form.name"></formInput>
						<formInput required prop="name" label="法人" v-model="form.name"></formInput>
					</myForm>
				</view>










			</view>

		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: '',
				form: {
					name: '',
					tel: '',
					wx: '',
					applyType: '',
					company: '',
					legalPerson: '',
					lpTel: '',
					businessLicenseL: '',
					foodLicense: '',
					others: '',
					address: '',
					logtitude: '',
					latitude: '',
					imgs: ''
				},
				rules: {},

				value: '',
				type: 'text',
				show: false,
				border: true,
				actionSheetList: [{
						text: '男'
					},
					{
						text: '女'
					},
					{
						text: '保密'
					}
				],

				action: 'http://www.example.com/upload',
				filesArr: [],
			};


		},

		methods: {

			// 点击actionSheet回调
			actionSheetCallback(index) {
				this.value = this.actionSheetList[index].text;
			}

		},


		submit() {
			let files = [];
			// 通过filter，筛选出上传进度为100的文件(因为某些上传失败的文件，进度值不为100，这个是可选的操作)
			files = this.$refs.uUpload.lists.filter(val => {
				return val.progress == 100;
			})
			// 如果您不需要进行太多的处理，直接如下即可
			// files = this.$refs.uUpload.lists;
			console.log(files)
		}



	}
</script>

<style lang="scss">
	.wrap {
		padding: 24rpx;
	}
	.contain{
		//background-color: #fffae8;
	}

	.bg-purple-light {
		//background: #fffae8;

	}

	.bg-purple-dark {
		//background: #99a9bf;
	}

	.u-row {
		margin: 40rpx 0;
	}

	.demo-layout {
		height: 80rpx;
		border-radius: 8rpx;
	}

	.bg-purple {
		background: #d3dce6;
	}

	.text_name {
		padding: 20rpx;
	}

	.text_rz {
		margin-top: 40rpx;
		margin-bottom: 40rpx;
		size: 20rpx;

	}
	.my_from{
		background-color: #fffae8;
	}
</style>
